package demo3;

public class Duck extends Animal implements Running,Swimming{
    String color;
    String sex;
    public  Duck(String name,int age,String color,String sex){
        super(name, age);
        this.color=color;
        this.sex=sex;
    }

    @Override
    public void eat() {
        System.out.println(this.name+"正在吃苞谷-----");
    }

    @Override
    public void running() {
        System.out.println(this.name+"正在田埂上奔跑------");
    }

    @Override
    public void swimming() {
        System.out.println(this.name+"正在河里游泳------");
    }
}
